package com.mai4j.maiadmin.configure;

import com.mai4j.maiadmin.misc.Id;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 微信公众号请关注: 开源螺丝钉
 * <br>
 * 码云请关注: <a href="https://gitee.com/xiyoufang">https://gitee.com/xiyoufang</a>
 * <br>
 * 哔哩哔哩请关注: <a href="https://space.bilibili.com/438927834">https://space.bilibili.com/438927834</a>
 *
 * @author xiyoufang
 */
@Configuration
public class MaiConfig {

    @Bean
    public Id id(MaiProperties maiProperties) {
        return new Id(maiProperties.getId().getWorkerId());
    }
}
